<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>理解对象</title>
	<script type="text/javascript">
    var book={};

    Object.defineProperties(book,{
          _year:{
          	value:2004
          },

          edition: {
          	value:1
          },

          year:{
          	get: function(){
          		return this._year;
          	},

          	set:function(newValue){
                 if (newValue>2004){
                 	this._year=newValue;
                 	this.edition += newValue-2004;

                 }
          	}
          }
    });

    var descriptor=Object.getOwnPropertyDescriptor(book,"_year");


    console.log(descriptor.value);
    alert(descriptor.configurable);
	  </script>
</head>
<body>
	
</body>
</html>